package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.Hashtable;

//申请该实体类映射表名
@TableName("t_product")
public class ProductBean {
    //表示该列为主键列，value表示该列映射列名，
    //type = IdType.AUTO 表示该列的值使用自动增长列生成
    @TableId(value = "pk_productId",type = IdType.AUTO)
    private Integer id;
    //指定当前属性映射的列名
    @TableField("p_name")
    private String name;
    @TableField("p_createDate")
    private LocalDate createDate;
    @TableField("p_price")
    private Integer price;

    public ProductBean() {
    }

    public ProductBean(String name, LocalDate createDate, Integer price) {
        this.name = name;
        this.createDate = createDate;
        this.price = price;
        Hashtable a;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", createDate=" + createDate +
                ", price=" + price +
                "}\n";
    }
}
